import request from '@/utils/request'
import { downFile } from '@/utils/request'

/**
 * 产品明细分页查询
 * @param {查询条件} data
 */
export function listGbProductionMx(query) {
  return request({
    url: 'Buss/GbProductionMx/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增产品明细
 * @param data
 */
export function addGbProductionMx(data) {
  return request({
    url: 'Buss/GbProductionMx',
    method: 'post',
    data: data,
  })
}
/**
 * 修改产品明细
 * @param data
 */
export function updateGbProductionMx(data) {
  return request({
    url: 'Buss/GbProductionMx',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取产品明细详情
 * @param {Id}
 */
export function getGbProductionMx(id) {
  return request({
    url: 'Buss/GbProductionMx/' + id,
    method: 'get'
  })
}

/**
 * 删除产品明细
 * @param {主键} pid
 */
export function delGbProductionMx(pid) {
  return request({
    url: 'Buss/GbProductionMx/delete/' + pid,
    method: 'POST'
  })
}
// 导出产品明细
export async function exportGbProductionMx(query) {
  await downFile('Buss/GbProductionMx/export', { ...query })
}
